########################################
# Events for Ethiopia
#
# written by Johan Andersson
########################################

namespace = flavor_eth
normal_or_historical_nations = yes

	
# Pero da Covilha
country_event = {
	id = flavor_eth.1
	title = flavor_eth.1.t
	desc = flavor_eth.1.d
	picture = SHIP_SAILING_eventPicture
	fire_only_once = yes

	trigger = {
		tag = ETH
		NOT = { is_year = 1550 }
		religion_group = christian
		
		any_owned_province = {
			has_discovered = POR
		}
		NOT = { war_with = POR }

	}

	mean_time_to_happen = {
		months = 30
	}
	
	immediate = {
		hidden_effect = {
			set_country_flag = eth_contact_with_portugal
		}
	}
	
	option = { 
		name = flavor_eth.1.a
		ai_chance = { factor = 90 }
		add_prestige = 5
		custom_tooltip = flavor_eth.1.a.desc
		set_country_flag = portuguese_embassy
		hidden_effect = {
			capital_scope = {
				POR = {
					discover_province = PREV
				}
			}
		}
	}
	option = {
		name = flavor_eth.1.b	
		ai_chance = { factor = 5 }
		add_legitimacy = 5
		hidden_effect = {
			capital_scope = {
				POR = {
					discover_province = PREV
				}
			}
		}
	}
	option = {
		name = flavor_eth.1.c
		ai_chance = { factor = 5 }
		reverse_add_casus_belli = {
			target = POR
			type = cb_insult
			months = 60
		}
		hidden_effect = {
			capital_scope = {
				POR = {
					discover_province = PREV
				}
			}
		}
	}	
	
	
}

#An Embassy Is Here!
country_event = {
	id = flavor_eth.2
	title = flavor_eth.2.t
	desc = flavor_eth.2.d
	picture = DIPLOMACY_eventPicture
	fire_only_once = yes

	trigger = {
		tag = ETH
		has_country_flag = portuguese_embassy
		NOT = { war_with = POR }
	}

	mean_time_to_happen = {
		months = 90
	}
	
	
	option = { 
		name = flavor_eth.2.a
		trigger = {
			is_neighbor_of = MAM
		}
		POR = {
			country_event = {
				id = flavor_eth.3
				days = 180
				tooltip = flavor_eth.2.3
			}
		}
		add_mil_power = 25
	}
	option = {
		name = flavor_eth.2.b	
		add_adm_power = 50
		add_dip_power = 50
		add_mil_power = 50
	}
	option = {
		name = flavor_eth.2.c
		add_years_of_income = 1.0
	}	

}


#Prester John?
country_event = {
	id = flavor_eth.3
	title = flavor_eth.3.t
	desc = flavor_eth.3.d
	picture = DIPLOMACY_eventPicture
	is_triggered_only = yes
	
	
	option = { 
		name = flavor_eth.3.a
		ai_chance = { factor = 90 }
		hidden_effect = {
			ETH = {
				country_event = {
					id = flavor_eth.4
					days = 180
				}
			}
		}
		add_mil_power = -50
		add_papal_influence = 10
		reverse_add_opinion = { who = ETH modifier = opinion_military_aid }
			
	}
	option = {
		name = flavor_eth.3.b
		add_prestige = -5
		hidden_effect = {
			ETH = {
				country_event = {
					id = flavor_eth.5
					days = 1825
				}
			}
		}
		reverse_add_opinion = { who = ETH modifier = opinion_refused_military_aid }
	}

}

# aid given
country_event = {
	id = flavor_eth.4
	title = flavor_eth.4.t
	desc = flavor_eth.4.d
	picture = DIPLOMACY_eventPicture
	is_triggered_only = yes
	
	option = { 
		name = flavor_eth.4.a
		reverse_add_opinion = { who = POR modifier = opinion_military_aid }
		add_country_modifier = {
			name = eth_mil_aid_from_portugal
			duration = 3650
		}
	}
}

# aid refused
country_event = {
	id = flavor_eth.5
	title = flavor_eth.5.t
	desc = flavor_eth.5.d
	picture = DIPLOMACY_eventPicture
	is_triggered_only = yes
	
	option = { 
		name = flavor_eth.5.a
		add_legitimacy = -10
	}
}

########################################
# Additional Events for Ethiopia
#
# written by Henrik Lohmander
########################################

# Centralization reforms of Zara Yakob
country_event = {
	id = flavor_eth.6
	title = flavor_eth.6.t
	desc = flavor_eth.6.d
	picture = COURT_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = ETH
		NOT = { is_year = 1460 }
		has_ruler = "Zara Yakob"
	}

	mean_time_to_happen = {
		months = 48
	}

	immediate = {
		hidden_effect = {
			set_country_flag = eth_had_centralization_event
		}
	}
	
	
	option = { 
		name = flavor_eth.6.a
		ai_chance = { factor = 90 }
		if = {
			limit = {
				NOT = { has_completed_all_reforms_trigger = yes }
			}
			add_reform_progress_small_effect = yes
		}
		add_ruler_modifier = { name = eth_zara_yakob_centralisation }
	}
	option = {
		name = flavor_eth.6.b	
		ai_chance = { factor = 10 }
		add_stability_or_adm_power = yes
	}
	
}

# The itinerant capital
country_event = {
	id = flavor_eth.7
	title = flavor_eth.7.t
	desc = flavor_eth.7.d
	picture = GOOD_WITH_MONARCH_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = ETH
		NOT = { is_year = 1460 }
		NOT = { has_dlc = "Origins" } 
	}

	mean_time_to_happen = {
		months = 48
	}
	
	
	option = { #This is how it always has been
		name = flavor_eth.7.a 
		ai_chance = { factor = 50 }
		add_stability_or_adm_power = yes
		set_country_flag = eth_itinerant_capital_flag
	}
	
	option = { 
		name = flavor_eth.7.b #Actively encourage cultural conversion of the countryside
		set_country_flag = eth_itinerant_capital_flag
		ai_chance = { factor = 50 }
		add_country_modifier = {
			name = eth_itinerant_capital
			duration = 3650
		}
	}
}

# Debre Berhan - The Mountain of Light
country_event = {
	id = flavor_eth.8
	title = flavor_eth.8.t
	desc = flavor_eth.8.d
	picture = CITY_VIEW_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = ETH
		is_year = 1455
		NOT = { is_year = 1520 }
		owns_core_province = 1213 #Shewa
		has_country_flag = eth_itinerant_capital_flag
		NOT = { has_dlc = "Origins" }
		religion_group = christian
	}

	mean_time_to_happen = {
		months = 195
	}
	
	
	option = {
		name = flavor_eth.8.a #The time has come for a permanent capital
		ai_chance = { factor = 90 }
		clr_country_flag = eth_itinerant_capital_flag
		set_country_flag = eth_debre_berhan_capital_flag
		add_adm_power = -25
		set_capital = 1213
		1213 = {
			rename_capital = "Debre Berhan"
			add_building = temple
		}
		every_owned_province = {
			limit = {
				OR = {
					province_id = 1213 #Shewa
					any_neighbor_province = {
						province_id = 1213
					}
				}
	 		}
			add_local_autonomy = -25
		}
	}
	
	option = {
		name = flavor_eth.8.b #Let us not break with tried traditions
		ai_chance = { factor = 10 }
		add_stability_or_adm_power = yes
	}
}

# Debre Berhan Plundered
province_event = {
	id = flavor_eth.9
	title = flavor_eth.9.t
	desc = flavor_eth.9.d
	picture = COUNTRY_COLLAPSE_eventPicture
	
	fire_only_once = yes

	trigger = {
		owned_by = ETH
		owner = {
			has_country_flag = eth_debre_berhan_capital_flag
		}
		is_capital = yes
		is_looted = yes
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = flavor_eth.9.a #To the provinces!
		owner = {
			set_country_flag = eth_itinerant_capital_flag
			clr_country_flag = eth_debre_berhan_capital_flag
			add_stability = -1
		}
	}
}

# Gondar - A new Capital
country_event = {
	id = flavor_eth.10
	title = flavor_eth.10.t
	desc = flavor_eth.10.d
	picture = CITY_VIEW_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = ETH
		is_year = 1630
		owns_core_province = 1224 #Begmeder
		NOT = { has_dlc = "Origins" }
	}

	mean_time_to_happen = {
		months = 195
		modifier = {
			factor = 0.75
			has_country_flag = eth_itinerant_capital_flag
		}
	}
	
	
	option = {
		name = flavor_eth.10.a #The time has come for a permanent capital
		clr_country_flag = eth_itinerant_capital_flag
		ai_chance = { factor = 90 }
		add_adm_power = -25
		set_capital = 1224
		every_owned_province = {
			limit = {
				OR = {
					province_id = 1224
					any_neighbor_province = {
						province_id = 1224
					}
				}
	 		}
			add_local_autonomy = -25
		}
	}
	
	option = {
		name = flavor_eth.10.b #Let us not break with tried traditions
		ai_chance = { factor = 10 }
		add_stability_or_adm_power = yes
	}
}

# Ethiopian-Mamluk Relations

#The fate of the Egyptian Copts
country_event = {
	id = flavor_eth.11
	title = flavor_eth.11.t
	desc = flavor_eth.11.d
	picture = ORTHODOX_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = ETH
		is_year = 1450
		NOT = { is_year = 1480 }
		exists = MAM
		NOT = { vassal_of = MAM }
		NOT = { overlord_of = MAM }
		NOT = { alliance_with = MAM }
		NOT = { war_with = MAM }
		MAM = {
			religion_group = muslim
			owns = 358
		}
		religion = coptic
	}

	mean_time_to_happen = {
		months = 90
	}
	
	
	option = {
		name = flavor_eth.11.a #Send a strongly worded letter
		ai_chance = { factor = 1 }
		every_country = {
			limit = {
				religion = coptic
			}
			add_opinion = { who = ETH modifier = opinion_good_relations }
		}
		MAM = {
			country_event = { id = flavor_eth.12 days = 14 }
		}
	}
	
	option = {
		name = flavor_eth.11.b #Avoid angering MAM
		ai_chance = { factor = 0 }
		add_prestige = -15
	}
	
	option = {
		name = flavor_eth.11.c #This is cause for war!
		ai_chance = { factor = 0 }
		add_casus_belli = {
			target = MAM
			type = cb_insult
			months = 1825
		}
		MAM = {
			country_event = { id = flavor_eth.13 days = 14 }
		}
	}
}

# A letter arrives from Ethiopia
country_event = {
	id = flavor_eth.12
	title = flavor_eth.12.t
	desc = flavor_eth.12.d
	picture = ACCUSATION_eventPicture
	
	is_triggered_only = yes
	
	
	option = {
		name = flavor_eth.12.a #Send a sarcastic reply.
		ai_chance = { factor = 90 }
		add_prestige = 5
		ETH = {
			country_event = { id = flavor_eth.14 days = 14 }
		}
	}
	
	option = {
		name = flavor_eth.12.b #Attempt to apologize and repair relations.
		ai_chance = { factor = 10 }
		add_prestige = -10
		ETH = {
			add_opinion = { who = MAM modifier = opinion_improved_relations }
		}
		ETH = {
			country_event = { id = flavor_eth.15 days = 1 }
		}
	}
}

# A letter arrives from Ethiopia
country_event = {
	id = flavor_eth.13
	title = flavor_eth.13.t
	desc = flavor_eth.13.d
	picture = ACCUSATION_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.13.a #They wouldn't dare
		tooltip = {
			ETH = {
				add_casus_belli = {
					target = MAM
					type = cb_insult
					months = 1825
				}
			}
		}
	}
}

#An ambassador from the Mamluks
country_event = {
	id = flavor_eth.14
	title = flavor_eth.14.t
	desc = flavor_eth.14.d
	picture = ACCUSATION_eventPicture
	
	is_triggered_only = yes
	
	
	option = {
		name = flavor_eth.14.a #Imprison the Ambassador
		ai_chance = { factor = 90 }
		add_prestige = 5
		MAM = {
			country_event = { id = flavor_eth.16 days = 14 }
			add_opinion = { who = ETH modifier = opinion_irritated }
		}
	}
	
	option = {
		name = flavor_eth.14.b #This is cause for war!
		ai_chance = { factor = 0 }
		add_prestige = 10
		add_casus_belli = {
			target = MAM
			type = cb_insult
			months = 1825
		}
		MAM = {
			country_event = { id = flavor_eth.13 days = 1 }
		}
	}
	
	option = {
		name = flavor_eth.14.c #Let's just drop it.
		ai_chance = { factor = 10 }
		add_prestige = -15
	}
}

#The Mamluks Apologize
country_event = {
	id = flavor_eth.15
	title = flavor_eth.15.t
	desc = flavor_eth.15.d
	picture = GOOD_WITH_MONARCH_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.15.a #Ok
		add_prestige = 10
		tooltip = {
			add_opinion = { who = MAM modifier = opinion_improved_relations }
		}
	}
}

#Ambassador Detained
country_event = {
	id = flavor_eth.16
	title = flavor_eth.16.t
	desc = flavor_eth.16.d
	picture = ACCUSATION_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.16.a #Ok
		set_country_flag = eth_ambassador_detained
		tooltip = {
			add_opinion = { who = ETH modifier = opinion_irritated }
		}
	}
}

#Death of a Bishop
country_event = {
	id = flavor_eth.17
	title = flavor_eth.17.t
	desc = flavor_eth.17.d
	picture = ORTHODOX_eventPicture
	
	fire_only_once = yes

	trigger = {
		tag = MAM
		owns = 358
		is_year = 1460
		exists = ETH
		religion_group = muslim
		ETH = {
			NOT = { has_country_flag = eth_autonomous_church }
			religion = coptic
		}
		NOT = { vassal_of = ETH }
		NOT = { overlord_of = ETH }
		NOT = { alliance_with = ETH }
		NOT = { war_with = ETH }
	}

	mean_time_to_happen = {
		months = 450
	}
	
	
	option = {
		name = flavor_eth.17.a #Prevent the appointment of a new Bishop
		ai_chance = { factor = 90 }
		ETH = {
			add_opinion = { who = MAM modifier = opinion_irritated }
			country_event = { id = flavor_eth.18 days = 14 }
		}
	}
	option = {
		name = flavor_eth.17.b #We must not interfere in these matters
		ai_chance = { factor = 10 }
	}
}

#Bishop missing
country_event = {
	id = flavor_eth.18
	title = flavor_eth.18.t
	desc = flavor_eth.18.d
	picture = ORTHODOX_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.18.a #Ok
		add_stability = -1
		tooltip = {
			add_opinion = { who = MAM modifier = opinion_irritated }
		}
	}
}

#The Monastic Orders
country_event = {
	id = flavor_eth.19
	title = flavor_eth.19.t
	desc = flavor_eth.19.d
	picture = ORTHODOX_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = ETH
		religion = coptic
	}

	mean_time_to_happen = {
		months = 600
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					religion = coptic
					is_capital = no
				}
				set_province_flag = eth_strong_monastaries
			}
			random_owned_province = {
				limit = {
					religion = coptic
					is_capital = no
					not = { has_province_flag = eth_strong_monastaries }
				}
				set_province_flag = eth_strong_monastaries
			}
			random_owned_province = {
				limit = {
					religion = coptic
					is_capital = no
					not = { has_province_flag = eth_strong_monastaries }
				}
				set_province_flag = eth_strong_monastaries
			}
		}
	}
	
	option = {
		name = flavor_eth.19.a #Attempt to rein them in
		ai_chance = { factor = 50 }
		add_stability = -1
		every_owned_province = {
			limit = {
				has_province_flag = eth_strong_monastaries
	 		}
			add_local_autonomy = -25
		}
	}
	option = {
		name = flavor_eth.19.b #We must safeguard the privileges of the Monasteries.
		ai_chance = { factor = 50 }
		add_stability_or_adm_power = yes
		every_owned_province = {
			limit = {
				has_province_flag = eth_strong_monastaries
	 		}
			add_local_autonomy = 25
		}
	}

}

#Independence from the Patriarchate
country_event = {
	id = flavor_eth.20
	title = flavor_eth.20.t
	desc = flavor_eth.20.d
	picture = ORTHODOX_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = ETH
		religion = coptic
		is_year = 1475
		NOT = { is_year = 1515 }
		358 = {
			owner = {
				religion_group = muslim
			}
		}
	}

	mean_time_to_happen = {
		months = 40
	}
	
	
	option = {
		name = flavor_eth.20.a #We cannot break with our Patriarch
		ai_chance = { factor = 90 }
		add_stability_or_adm_power = yes
	}
	option = {
		name = flavor_eth.20.b #Our Church should be free of foreign influence.
		ai_chance = { factor = 10 }
		add_stability = -1
		add_country_modifier = {
			name = eth_independent_church
			duration = 3650
		}
		set_country_flag = eth_autonomous_church
	}
}

#The Oromo
country_event = {
	id = flavor_eth.21
	title = flavor_eth.21.t
	desc = flavor_eth.21.d
	picture = FAMINE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		is_year = 1570
		NOT = { is_year = 1680 }
		OR = {
			owns_core_province = 1218
			owns_core_province = 1210
			owns_core_province = 2779
		}
	}
	
	immediate = {
		hidden_effect = {
			set_country_flag = eth_start_oromo
			set_global_flag = eth_start_of_the_oromo
		}
	}

	mean_time_to_happen = {
		months = 330
	}
	
	option = {
		name = flavor_eth.21.a #Ok.
		every_province = {
			limit = {
				OR = {
					province_id = 1207
					province_id = 1210
					province_id = 1218
					province_id = 2760
					province_id = 2761
					province_id = 2779
				}
			}
			set_province_flag = eth_starting_oromo_provinces
			tooltip = {
				add_province_modifier = {
					name = "eth_oromo_migration"
					duration = 3650
				}
				change_culture = oromo
				change_religion = shamanism
			}
			hidden_effect = {
				if = {
					limit = { owned_by = ROOT }
					add_province_modifier = {
						name = "eth_oromo_migration"
						duration = 3650
					}
					change_culture = oromo
					change_religion = shamanism
				}
			}
		}
		every_country = {
			limit = {
				NOT = {
					has_country_flag = eth_start_oromo
				}
				any_owned_province = {
					OR = {
						province_id = 1207
						province_id = 1210
						province_id = 1218
						province_id = 2760
						province_id = 2761
						province_id = 2779
					}
				}
			}
			country_event = { id = flavor_eth.22 }
		}
	}
}

#Oromo info event
country_event = {
	id = flavor_eth.22
	title = flavor_eth.21.t
	desc = flavor_eth.21.d
	picture = FAMINE_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.21.a #Ok.

		1207 = {
			if = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = "eth_oromo_migration"
					duration = 3650
				}
				change_culture = oromo
				change_religion = shamanism
			}
		}
		1210 = {
			if = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = "eth_oromo_migration"
					duration = 3650
				}
				change_culture = oromo
				change_religion = shamanism
			}
		}
		1218 = {
			if = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = "eth_oromo_migration"
					duration = 3650
				}
				change_culture = oromo
				change_religion = shamanism
			}
		}
		2760 = {
			if = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = "eth_oromo_migration"
					duration = 3650
				}
				change_culture = oromo
				change_religion = shamanism
			}
		}
		2761 = {
			if = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = "eth_oromo_migration"
					duration = 3650
				}
				change_culture = oromo
				change_religion = shamanism
			}
		}
		2779 = {
			if = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = "eth_oromo_migration"
					duration = 3650
				}
				change_culture = oromo
				change_religion = shamanism
			}
		}
	}
}

#Oromo Settlers (repeating)
province_event = {
	id = flavor_eth.23
	title = flavor_eth.23.t
	desc = flavor_eth.23.d
	picture = BORDER_TENSION_eventPicture
	
	mean_time_to_happen = {
		months = 120
	}
	
	trigger = {
		NOT = { has_province_modifier = eth_oromo_migration }
		NOT = { has_global_flag = end_of_oromo_migrations }
		region = horn_of_africa_region
		NOT = { area = red_sea_coast_area }
		NOT = { area = dongola_area }
		NOT = { area = upper_nubia_area }
		any_neighbor_province = {
			has_province_modifier = eth_oromo_migration
		}
	}
	
	option = {
		name = flavor_eth.23.a #Ok.
		add_province_modifier = {
			name = "eth_oromo_migration"
			duration = 3650
		}
		change_culture = oromo
		change_religion = shamanism
	}
}

#Integration of the Oromo
country_event = {
	id = flavor_eth.24
	title = flavor_eth.24.t
	desc = flavor_eth.24.d
	picture = CITY_DEVELOPMENT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		NOT = { has_global_flag = end_of_oromo_migrations }
		any_owned_province = { has_province_modifier = eth_oromo_migration }
		OR = {
			num_of_owned_provinces_with = {
				value = 6 #Can trigger once there are Oromos in 6 provinces or more in one country.
				has_province_modifier = eth_oromo_migration
			}
			had_global_flag = { flag = eth_start_of_the_oromo days = 3650 }
		}
	}
	
	immediate = {
		hidden_effect = {
			set_country_flag = eth_end_oromo
			every_country = {
				limit = {
					not = { has_country_flag = eth_end_oromo }
					any_owned_province = { has_province_modifier = eth_oromo_migration }
				}
				country_event = { id = flavor_eth.25 days = 1 }	#Info Event
			}
		}
	}
	
	mean_time_to_happen = {
		months = 36
		modifier = {
			factor = 0.5
			num_of_owned_provinces_with = {
				value = 8
				has_province_modifier = eth_oromo_migration
			}
		}
		modifier = {
			factor = 0.5
			num_of_owned_provinces_with = {
				value = 10
				has_province_modifier = eth_oromo_migration
			}
		}
		modifier = {
			factor = 0.5
			num_of_owned_provinces_with = {
				value = 12
				has_province_modifier = eth_oromo_migration
			}
		}
	}
	
	option = {
		name = flavor_eth.24.a #Ok.
		set_global_flag = end_of_oromo_migrations
		every_province = {
			limit = {
				has_province_modifier = eth_oromo_migration
			}
			remove_province_modifier = eth_oromo_migration
		}
		random_province = {
			limit = {
				culture = oromo
				NOT = { is_core = JIM }
			}
			add_core = JIM
		}
	}
}

#Info events for other affected countries
country_event = {
	id = flavor_eth.25
	title = flavor_eth.24.t
	desc = flavor_eth.24.d
	picture = CITY_DEVELOPMENT_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.24.a #Ok.
		set_country_flag = eth_end_oromo
	}
}

#Amba Geshen - The Mountain of Kings
country_event = {
	id = flavor_eth.26
	title = flavor_eth.26.t
	desc = flavor_eth.26.d
	picture = KING_SICK_IN_BED_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = ETH
		owns = 1224
		ruler_age = 40
		is_lesser_in_union = no
		has_heir = no
		government = monarchy
		has_government_attribute = heir
	}
	
	mean_time_to_happen = {
		months = 48
	}
	
	option = {
		name = flavor_eth.26.a #We are fortunate that our ancestors had such foresight.
		ai_chance = { factor = 90 }
		add_stability_or_adm_power = yes
		define_heir = {
			claim = 100
			dynasty = ROOT
		}
		add_country_modifier = {
			name = eth_mount_geshen
			duration = -1
		}
	}
	
	option = {
		name = flavor_eth.26.b #We have no need for this gilded prison.
		ai_chance = { factor = 10 }
		custom_tooltip = flavor_eth.26.b.tt
	}
}

#Helen of Ethiopia
country_event = {
	id = flavor_eth.27
	title = flavor_eth.27.t
	desc = flavor_eth.27.d
	picture = GOOD_WITH_MONARCH_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		has_ruler = "Zara Yakob"
		NOT = { is_year = 1468 }
		NOT = {
			has_global_flag = wih_eleniethiopia_flag
		}
	}
	
	mean_time_to_happen = {
		months = 24
	}
	
	immediate = {
		set_global_flag = wih_eleniethiopia_flag
	}
	
	option = {
		name = flavor_eth.27.a #Ok
		add_adm_power = 25
		if = {
			limit = {
				NOT = { has_dlc = "Rights of Man" }
			}
			define_advisor = {
				type = statesman
				name = "Eleni"
				culture = sidamo
				religion = coptic #But was muslim
				skill = 3
				female = yes
				discount = yes
			}
		}
		if = {
			limit = {
				has_dlc = "Rights of Man"
				has_government_attribute = queen
			}
			define_consort = {
				name = "Eleni"
				country_of_origin = HDY
				dynasty = "Hadiya"
				culture = sidamo
				religion = coptic #But was muslim
				adm = 4
				dip = 4
				mil = 3
				female = yes
			}
			hidden_effect = {
				add_queen_personality = righteous_personality
				add_queen_personality = intricate_web_weaver_personality
			}
		}
	}
}

#Disaster at the Mountain of Kings
country_event = {
	id = flavor_eth.28
	title = flavor_eth.28.t
	desc = flavor_eth.28.d
	picture = KING_SICK_IN_BED_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		tag = ETH
		has_country_modifier = eth_mount_geshen
	}
	
	mean_time_to_happen = {
		months = 1000
	}
	
	option = {
		name = flavor_eth.28.a #All is lost.
		ai_chance = { factor = 90 }
		add_stability = -2
		remove_country_modifier = eth_mount_geshen
	}
}

########################################
# DLC Events for Ethiopia
#
# written by Ogulcan Yildirim
########################################

#The many troubles of the Negusa Nagast
country_event = {
	id = flavor_eth.29
	title = flavor_eth.29.t
	desc = flavor_eth.29.desc
	picture = NEGUSA_NAGAST_eventPicture
	
	trigger = {
		has_dlc = "Origins"
		has_mission = eth_reform_the_negusa_government
		NOT = { has_country_modifier = eth_negusa_nagast_issues }
		has_reform = negusa_nagast
		NOT = { has_country_flag = has_negusa_event }
		NOT = { mission_completed = eth_reform_the_negusa_government }
	}

	mean_time_to_happen = {
		months = 1
	}

	immediate = {
		hidden_effect = { set_country_flag = has_negusa_event }
	}

	option = {
		name = flavor_eth.29.a
		add_country_modifier = {
			name = eth_negusa_nagast_issues
			duration = -1
		}
		hidden_effect = {
			clr_country_flag = has_negusa_event
		}

		ai_chance = {
			factor = 1
		}
	}
}

#Permanent Cities for Ethiopia
country_event = {
	id = flavor_eth.30
	title = flavor_eth.30.t
	desc = flavor_eth.30.desc
	picture = NEGUSA_NAGAST_eventPicture

	is_triggered_only = yes

	option = {
		name = flavor_eth.30.a
		if = {
			limit = {
				NOT = { government = monarchy }
			}
			change_government = monarchy
		}
		add_government_reform = solomonic_empire
		remove_country_modifier = eth_negusa_nagast_issues

		ai_chance = {
			factor = 1
		}
	}

	option = {
		name = flavor_eth.30.b
		remove_country_modifier = eth_negusa_nagast_issues
		capital_scope = {
			region = {
				limit = {
					owned_by = ROOT
				}
				add_local_autonomy = -25
			}
		}

		ai_chance = {
			factor = 0
		}
	}
}

#The Ark of the Covenant - Depreceated
country_event = {
	id = flavor_eth.33
	title = flavor_eth.33.t
	desc = flavor_eth.33.desc
	picture = DEATH_OF_HEIR_eventPicture
	
	is_triggered_only = yes

	option = {
		name = flavor_eth.33.a

		add_country_modifier = {
			name = eth_blessing_of_kings
			duration = -1
		}

		add_stability = 2
		add_estate_loyalty = {
			estate = estate_church
			loyalty = 100
		}
	}
}

#The integration of Damot and Hadiya
country_event = {
	id = flavor_eth.35
	title = flavor_eth.35.t
	desc = flavor_eth.35.desc
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes
	
	option = {	#Integrate the vassals
		name = flavor_eth.35.a
		add_country_modifier = {
			name = eth_better_integration
			duration = 10950
		}

		ai_chance = {
			factor = 100
		}
	}

	option = {	#Just demand more tribute instead
		name = flavor_eth.35.b
		add_country_modifier = {
			name = eth_better_vassal_handling
			duration = 10950
		}

		ai_chance = {
			factor = 0
		}
	}
}

#Liberation of the Copts
country_event = {
	id = flavor_eth.37
	title = flavor_eth.37.t
	desc = flavor_eth.37.desc
	picture = COPTIC_BISHOP_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.37.a
		1232 = {
			change_religion = coptic
			add_base_tax = 2
			add_base_production = 2
			add_base_manpower = 1
		}

		ai_chance = {
			factor = 100
		}
	}
}

#Reconstruction of Adulis
country_event = {
	id = flavor_eth.38
	title = flavor_eth.38.t
	desc = flavor_eth.38.desc
	picture = COPTIC_CITY_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.38.a
		1230 = {
			change_province_name = "Adulis"
			rename_capital = "Adulis"
			add_base_tax = 3
			add_base_production = 3
			add_base_manpower = 2
			center_of_trade = 2
		}

		ai_chance = {
			factor = 100
		}
	}
}

#Restore the Aksumite Empire
country_event = {
	id = flavor_eth.39
	title = flavor_eth.39.t
	desc = flavor_eth.39.desc
	picture = NEGUSA_NAGAST_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.39.a
		add_country_modifier = {
			name = eth_restoration_of_ancient_borders
			duration = 9125
		}
		change_tag = AKS
		add_prestige = 25
		if = {
			limit = {
				has_custom_ideas = no
				NOT = { has_idea_group = AKS_ideas }
			}
			country_event = { id = ideagroups.1 } #Swap Ideas
		}
		set_country_flag = formed_aksumite_empire_flag

		ai_chance = {
			factor = 100
		}
	}
	
	option = {
		name = flavor_eth.39.b
		add_country_modifier = {
			name = eth_restoration_of_ancient_borders
			duration = 9125
		}
		custom_tooltip = flavor_eth.39.b.tt
		hidden_effect = {
			set_country_flag = eth_can_form_aksumite
		}

		ai_chance = {
			factor = 0
		}
	}
}

#Deal with the Beta Israelis
country_event = {
	id = flavor_eth.40
	title = flavor_eth.40.t
	desc = flavor_eth.40.desc
	picture = AFRICAN_BATTLE_eventPicture
	
	is_triggered_only = yes
	
	option = {	#Try to convert them
		name = flavor_eth.40.a
		add_stability = -2
		1227 = {
			change_religion = ROOT
			remove_core = BTI
		}
		2771 = {
			change_religion = ROOT
			remove_core = BTI
		}
		2772 = {
			change_religion = ROOT
			remove_core = BTI
		}

		ai_chance = {
			factor = 0
		}
	}
	
	option = {	#We should not create a bigger rift between our people
		name = flavor_eth.40.b
		add_stability = 1
		2771 = {
			add_province_modifier = {
				name = eth_accepted_society
				duration = 9125
			}
		}
		2772 = {
			add_province_modifier = {
				name = eth_accepted_society
				duration = 9125
			}
		}
		ai_chance = {
			factor = 100
		}
	}
}

#Sail through the Nil
country_event = {
	id = flavor_eth.41
	title = flavor_eth.41.t
	desc = flavor_eth.41.desc
	picture = SHIP_SAILING_eventPicture
	
	is_triggered_only = yes

	option = {
		name = flavor_eth.41.a

		eastern_mediterrenean_area = {
			discover_country = ROOT
		}

		hidden_effect = {
			country_event = {
				id = flavor_eth.42
				days = 50	#The actual ingame time needed to reach Rome from Dumyat with galleys
			}
		}
	}
}

#Reach Italy
country_event = {
	id = flavor_eth.42
	title = flavor_eth.42.t
	desc = flavor_eth.42.desc
	picture = SHIP_SAILING_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.42.a

		western_mediterrenean_area = {
			discover_country = ROOT
		}

		italy_region = {
			discover_country = ROOT
		}

		if = {
			limit = {
				exists = PAP
				118 = {
					owned_by = PAP
				}
			}
			PAP = {
				country_event = {
					id = flavor_eth.43
				}
				add_opinion = {
					who = ROOT
					modifier = eth_restored_contact
				}
			}
		}
	}
}

#Pope's contact with Ethiopia
country_event = {
	id = flavor_eth.43
	title = flavor_eth.43.t
	desc = flavor_eth.43.desc
	picture = SHIP_SAILING_eventPicture
	
	is_triggered_only = yes
	
	option = {
		name = flavor_eth.43.a
		custom_tooltip = flavor_eth.43.a.tt
		hidden_effect = {
			every_province = {
				limit = {
					owned_by = FROM
				}
				discover_country = ROOT
			}
		}
		add_dip_power = 50
		reverse_add_opinion = {
			who = FROM
			modifier = eth_restored_contact
		}
	}
}

#Alliance with Portugal for Ethiopia
country_event = {
	id = flavor_eth.44
	title = flavor_eth.44.t
	desc = flavor_eth.44.desc
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes

	option = {	#Let's try it
		name = flavor_eth.44.a
		POR = {
			country_event = {
				id = flavor_eth.45
			}
		}

		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				OR = {
					is_rival = POR
					POR = {
						is_rival = ROOT
					}
				}
			}
		}
	}

	option = {	#We are better without them
		name = flavor_eth.44.b
		add_dip_power = 100

		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				NOT = { is_rival = POR }
				POR = {
					NOT = { is_rival = ROOT }
				}
			}
		}
	}
}

#Alliance with Ethiopia for Portugal
country_event = {
	id = flavor_eth.45
	title = flavor_eth.45.t
	desc = flavor_eth.45.desc
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes

	option = {	#Accept alliance
		name = flavor_eth.45.a
		add_historical_friend = FROM
		tooltip = {
			create_alliance = FROM
			FROM = {
				add_historical_friend = ROOT
			}
		}
		if = {
			limit = {
				exists = ADA
			}
			custom_tooltip = flavor_eth.45.a.at
		}
		custom_tooltip = flavor_eth.43.a.tt
		hidden_effect = {
			FROM = {
				country_event = {
					id = flavor_eth.46
				}
			}
			every_province = {
				limit = {
					owned_by = FROM
				}
				discover_country = ROOT
			}
		}
		add_mil_power = -50
		add_dip_power = 50

		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				OR = {
					FROM = {
						NOT = { religion_group = ROOT }
					}
					FROM = {
						is_rival = ROOT
					}
					is_rival = FROM
				}
			}
		}
	}

	option = {	#Refuse alliance
		name = flavor_eth.45.b
		hidden_effect = {
			FROM = {
				country_event = {
					id = flavor_eth.47
				}
			}
		}
		add_mil_power = 50
		add_dip_power = -50

		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				FROM = {
					religion_group = ROOT
					NOT = { is_rival = ROOT }
				}
				NOT = { is_rival = FROM }
			}
		}
	}
}

#Portugal accepts alliance
country_event = {
	id = flavor_eth.46
	title = flavor_eth.46.t
	desc = flavor_eth.46.desc
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes

	option = {
		name = flavor_eth.46.a
		custom_tooltip = flavor_eth.43.a.tt
		if = {
			limit = {
				exists = ADA
			}
			custom_tooltip = flavor_eth.46.a.at
		}
		create_alliance = FROM
		add_historical_friend = FROM
		tooltip = {
			FROM = {
				add_historical_friend = ROOT
			}
		}
		hidden_effect = {
			set_country_flag = portuguese_embassy
			set_country_flag = eth_portuguese_help
			every_province = {
				limit = {
					owned_by = FROM
				}
				discover_country = ROOT
			}
		}
	}
}

#Portugal refuses alliance
country_event = {
	id = flavor_eth.47
	title = flavor_eth.47.t
	desc = flavor_eth.47.desc
	picture = DIPLOMACY_eventPicture
	
	is_triggered_only = yes

	option = {
		name = flavor_eth.47.a
	}
}

#Westernize your troops
country_event = {
	id = flavor_eth.48
	title = flavor_eth.48.t
	desc = flavor_eth.48.desc
	picture = MILITARY_CAMP_eventPicture
	
	is_triggered_only = yes

	option = {
		name = flavor_eth.48.a
		change_technology_group = western
		change_unit_type = western
		add_country_modifier = {
			name = eth_modernized_army
			duration = 9125
		}
		add_mil_power = -200
	}
}

#Random flavor events

#Adal gets support from the Ottomans
country_event = {
	id = flavor_eth.49
	title = flavor_eth.49.t
	desc = {
		desc = flavor_eth.49.desc
		trigger = {
			exists = TUR
		}
	}
	desc = {
		desc = flavor_eth.49.ada.desc
		trigger = {
			NOT = { exists = TUR }
		}
	}
	picture = JANISSARIES_IN_FORMATION_eventPicture
	
	trigger = {
		has_country_flag = ada_has_turkish_help
		NOT = { is_year = 1600 }
		war_with = ETH
	}

	fire_only_once = yes

	mean_time_to_happen = {
		months = 12
	}

	major = yes
	
	option = {
		name = flavor_eth.49.a
		custom_tooltip = flavor_eth.49.a.tt
		hidden_effect = {
			set_global_flag = eth_ottoman_company_available
			clr_country_flag = ada_has_turkish_help
		}
		define_general = {
			name = "Sayid Mehmed"
			shock = 3
			fire = 3
			manuever = 2
			siege = 0
		}
		add_army_professionalism = 0.05
		add_army_tradition = 25

		ai_chance = {
			factor = 90
		}
	}
}

#Ethiopia gets support from the Portugese
country_event = {
	id = flavor_eth.50
	title = flavor_eth.50.t
	desc = flavor_eth.50.desc
	picture = AFRICAN_BATTLE_eventPicture
	
	trigger = {
		has_global_flag = eth_ottoman_company_available
		tag = ETH
		exists = POR
		has_country_flag = eth_portuguese_help
		is_at_war = yes
		NOT = { war_with = POR }
		NOT = { is_year = 1600 }
	}

	fire_only_once = yes

	mean_time_to_happen = {
		months = 240
		modifier = {
			factor = 0.1
			war_with = ADA
		}
		modifier = {
			factor = 0.5
			any_owned_province = {
				has_discovered = POR
			}
		}
	}

	major = yes
	
	option = {
		name = flavor_eth.50.a
		custom_tooltip = flavor_eth.50.a.tt
		hidden_effect = {
			set_global_flag = eth_portugese_company_available
			clr_country_flag = eth_portuguese_help
		}
		define_general = {
			name = "Cristóvão da Gama"
			shock = 4
			fire = 4
			manuever = 3
			siege = 0
		}
		add_army_professionalism = 0.05
		add_army_tradition = 25

		ai_chance = {
			factor = 90
		}
	}
}

#End of the conflicts between Portugal and the Ottomans
country_event = {
	id = flavor_eth.51
	title = flavor_eth.51.t
	desc = flavor_eth.51.desc
	picture = LAND_MILITARY_eventPicture
	
	trigger = {
		OR = {
			tag = ETH
			was_tag = ETH
		}
		has_global_flag = eth_ottoman_company_available
		is_year = 1600
	}

	fire_only_once = yes

	mean_time_to_happen = {
		months = 12
	}
	
	major = yes
	
	option = {
		name = flavor_eth.51.a
		custom_tooltip = flavor_eth.51.a.tt
		hidden_effect = {
			clr_global_flag = eth_ottoman_company_available
			clr_global_flag = eth_portugese_company_available
		}

		ai_chance = {
			factor = 100
		}
	}
}

#Jesuit activities in Ethiopia
country_event = {
	id = flavor_eth.52
	title = flavor_eth.52.t
	desc = flavor_eth.52.desc
	picture = AFRICAN_CATHOLIC_eventPicture

	trigger = {
		tag = ETH
		is_year = 1600
		NOT = { is_year = 1700 }
		exists = POR
		OR = {
			alliance_with = POR
			has_country_flag = portuguese_embassy
		}
		religion = coptic
		num_of_owned_provinces_with = {
			region = horn_of_africa_region
			value = 6
		}
		has_dlc = "Origins"
	}

	fire_only_once = yes
	
	mean_time_to_happen = {
		months = 120
	}

	option = {	#Banish them from Ethiopia
		name = flavor_eth.52.a
		reverse_add_opinion = {
			who = POR
			modifier = eth_banned_jesuits
		}
		random_owned_province = {
			limit = {
				region = horn_of_africa_region
				religion = coptic
			}
			spawn_small_scaled_rebels = {
				no_defined_leader = yes
				type = catholic_rebels
			}
		}

		ai_chance = {
			factor = 60
		}
	}

	option = {	#Tolerate them
		name = flavor_eth.52.b
		random_owned_province = {
			limit = {
				region = horn_of_africa_region
				religion = coptic
			}
			change_religion = catholic
			add_permanent_province_modifier = {
				name = "religious_zeal_at_conv"
				duration = 9000
			}
		}
		random_owned_province = {
			limit = {
				region = horn_of_africa_region
				religion = coptic
			}
			change_religion = catholic
			add_permanent_province_modifier = {
				name = "religious_zeal_at_conv"
				duration = 9000
			}
		}
		random_owned_province = {
			limit = {
				region = horn_of_africa_region
				religion = coptic
			}
			change_religion = catholic
			add_permanent_province_modifier = {
				name = "religious_zeal_at_conv"
				duration = 9000
			}
		}
		add_stability = -1
		ai_chance = {
			factor = 30
		}
	}

	option = {	#Convert to Catholicism 
		name = flavor_eth.52.c
		change_religion = catholic
		capital_scope = {
			change_religion = catholic
			add_permanent_province_modifier = {
				name = "religious_zeal_at_conv"
				duration = 9000
			}
		}
		random_owned_province = {
			limit = {
				region = horn_of_africa_region
				religion = coptic
			}
			change_religion = catholic
			add_permanent_province_modifier = {
				name = "religious_zeal_at_conv"
				duration = 9000
			}
		}
		random_owned_province = {
			limit = {
				region = horn_of_africa_region
				religion = coptic
			}
			spawn_large_scaled_rebels = {
				no_defined_leader = yes
				type = coptic_rebels
			}
		}
		random_owned_province = {
			limit = {
				region = horn_of_africa_region
				religion = coptic
			}
			spawn_large_scaled_rebels = {
				no_defined_leader = yes
				type = coptic_rebels
			}
		}

		ai_chance = {
			factor = 10
		}
	}
}

#Mechanic events
#Itinerant Capital Mechanic - Move the capital
country_event = {
	id = flavor_eth.100
	title = none
	desc = none
	picture = none
	hidden = yes

	trigger = {
		has_government_attribute = has_itinerant_capital
		capital_scope = {
			NOT = { has_province_flag = is_itinerent_capital }
		}
		has_dlc = "Origins"
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		every_owned_province = {
			limit = {
				has_province_modifier = itinerant_capital_area
			}
			remove_province_modifier = itinerant_capital_area
		}
		every_owned_province = {
			limit = {
				has_province_flag = is_itinerent_capital
			}
			add_local_autonomy = 10
			clr_province_flag = is_itinerent_capital
		}
		capital_scope = {
			set_province_flag = is_itinerent_capital
			add_local_autonomy = -100
			area = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = itinerant_capital_area
					duration = -1
				}
				add_local_autonomy = -10
			}
		}
		add_country_modifier = {
			name = itinerant_capital_just_moved
			duration = 1825
		}
		ai_chance = {
			factor = 1
		}
	}
}

#Itinerant Capital Mechanic - Remove flag
country_event = {
	id = flavor_eth.101
	title = none
	desc = none
	picture = none
	hidden = yes

	trigger = {
		any_owned_province = {
			has_province_flag = is_itinerent_capital
		}
		NOT = { has_government_attribute = has_itinerant_capital }
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		every_owned_province = {
			limit = {
				has_province_flag = is_itinerent_capital
			}
			clr_province_flag = is_itinerent_capital
		}
		every_owned_province = {
			limit = {
				has_province_modifier = itinerant_capital_area
			}
			remove_province_modifier = itinerant_capital_area
		}
		if = {
			limit = {
				has_country_modifier = itinerant_capital_just_moved
			}
			remove_country_modifier = itinerant_capital_just_moved
		}
		ai_chance = {
			factor = 1
		}
	}
}

#Itinerant Capital Mechanic - Give modifier to new province
country_event = {
	id = flavor_eth.102
	title = none
	desc = none
	picture = none
	hidden = yes

	trigger = {
		has_government_attribute = has_itinerant_capital
		capital_scope = {
			has_province_flag = is_itinerent_capital
			area_for_scope_province = {
				NOT = { has_province_modifier = itinerant_capital_area }
				owned_by = ROOT
			}
		}
		has_dlc = "Origins"
	}

	mean_time_to_happen = {
		days = 1
	}

	option = {
		capital_scope = {
			area = {
				limit = {
					NOT = { has_province_modifier = itinerant_capital_area }
					owned_by = ROOT
				}
				add_province_modifier = {
					name = itinerant_capital_area
					duration = -1
				}
			}
		}
		ai_chance = {
			factor = 1
		}
	}
}

#Itinerant Capital - AI event because I don't trust the AI to handle this and I want them to survive until 1820
country_event = {
	id = flavor_eth.103
	title = none
	desc = none
	picture = none
	hidden = yes

	trigger = {
		has_government_attribute = has_itinerant_capital
		has_country_modifier = eth_negusa_nagast_issues
		NOT = { has_country_modifier = itinerant_capital_just_moved }
		has_dlc = "Origins"
		any_owned_province = {
			continent = ROOT
			NOT = { has_province_modifier = itinerant_capital_area }
			NOT = { has_province_flag = is_itinerent_capital }
		}
		ai = yes
	}

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		random_owned_province = {
			limit = {
				continent = ROOT
				is_state = yes 
				NOT = { has_province_modifier = itinerant_capital_area }
				NOT = { has_province_flag = is_itinerent_capital }
			}
			save_event_target_as = eth_new_capital
		}
		random_owned_province = {
			limit = {
				continent = ROOT
				is_state = yes 
				NOT = { has_province_modifier = itinerant_capital_area }
				NOT = { has_province_flag = is_itinerent_capital }
				development = 10
			}
			save_event_target_as = eth_new_capital
		}
		random_owned_province = {
			limit = {
				continent = ROOT
				is_state = yes 
				NOT = { has_province_modifier = itinerant_capital_area }
				NOT = { has_province_flag = is_itinerent_capital }
				development = 20
			}
			save_event_target_as = eth_new_capital
		}
		random_owned_province = {
			limit = {
				continent = ROOT
				is_state = yes 
				NOT = { has_province_modifier = itinerant_capital_area }
				NOT = { has_province_flag = is_itinerent_capital }
				development = 30
			}
			save_event_target_as = eth_new_capital
		}
		random_owned_province = {
			limit = {
				continent = ROOT
				is_state = yes 
				NOT = { has_province_modifier = itinerant_capital_area }
				NOT = { has_province_flag = is_itinerent_capital }
				development = 40
			}
			save_event_target_as = eth_new_capital
		}
	}

	option = {
		every_owned_province = {
			limit = {
				has_province_modifier = itinerant_capital_area
			}
			remove_province_modifier = itinerant_capital_area
		}
		every_owned_province = {
			limit = {
				has_province_flag = is_itinerent_capital
			}
			add_local_autonomy = 10
			clr_province_flag = is_itinerent_capital
		}
		set_capital = event_target:eth_new_capital
		event_target:eth_new_capital = {
			set_province_flag = is_itinerent_capital
			add_local_autonomy = -100
			area = {
				limit = {
					owned_by = ROOT
				}
				add_province_modifier = {
					name = itinerant_capital_area
					duration = -1
				}
				add_local_autonomy = -10
			}
		}
		add_country_modifier = {
			name = itinerant_capital_just_moved
			duration = 1825
		}
		ai_chance = {
			factor = 1
		}
	}
}